<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%@page isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>
    <link href="css/reg.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="css/base.css" type="text/css"/>
    <link rel="stylesheet" href="css/headbott.css" type="text/css"/>
    <link rel="stylesheet" href="css/index.css" type="text/css"/>
    <link rel="stylesheet" href="css/ly-list.css" type="text/css"/>
    <link rel="stylesheet" href="css/reg.css" type="text/css"/>
    <link rel="stylesheet" href="layui/css/layui.css" type="text/css">
    <script src="js/jquery-3.6.0.min.js"></script>
    <title></title>
    <style type="text/css">
        #content {
            margin: 0 auto;
            width: 60%;
        }

        table {
            border: none;
        }

        .shrink {
            white-space: nowrap
        }

        .expand {
            width: 99%
        }

        .fubiaoti {
            text-align: center;
        }
    </style>
</head>
<body>
<c:if test="${user == null}">
    <script>
        window.location.href="login.jsp";
    </script>
</c:if>
<c:if test="${user.status != 2}">
    <script>
        window.location.href="user.jsp?msg=f";
    </script>
</c:if>
<!--上部导航栏开始-->
<div id="header">
    <div class="heade-con">
        <div class="logo"><a href=""><img src="images/LOGO.png"/></a></div>
        <div class="nav posa">
            <ul>
                <li><a href="index.jsp">首页</a></li>
                <li><a href="gyzc-list.jsp">公益众筹</a></li>
                <li><a href="cop.jsp">常见问题</a></li>
                <li><a href="ly-list.jsp">众筹资讯</a></li>
                <li><a class="vcolor" href="new_product.jsp" style="">发布项目</a></li>
            </ul>
        </div>
        <div class="search">
            <form action="">
                <input type="text" class="search-txt" value="" placeholder="找项目">
                <input type="submit" class="search-but" value="">
            </form>
        </div>
        <div class="index-login">
            <c:if test="${user == null}">
                <a href="login.jsp">登录</a><a href="reg.jsp">注册</a><a href="./admin/admin_login.jsp">后台</a>
            </c:if>
            <c:if test="${user != null}">
                <a href="/product/getByUserId">个人中心</a><a href="user/logout" id="lout">退出</a>
            </c:if>
        </div>
    </div>
</div>

<div id="content">


    <div>


        <table class="layui-table">
            <form id="psb" action="product/add" method="post" enctype="multipart/form-data">
                <tr>
                    <td class="fubiaoti">
                        <h4>选择你的身份类型</h4>
                    </td>
                    <td>
                        <button id="person" type="button" class="btn btn-success">个人</button>
                        <button id="company" type="button" class="btn btn-primary">公司</button>
                    </td>
                    <td>
                        <button type="submit" id="sub" class="btn btn-default">提交</button>
                    </td>
                </tr>

                <tr>
                    <td class="fubiaoti">
                        发起人信息
                    </td>
                    <td colspan="2">
                        <table class="layui-table">
                            <input hidden type="text" name="userId" value="1">
                            <tr>
                                <td class="shrink">申请人姓名</td>
                                <td><input class="layui-input" type="text" name="realname" placeholder="请输入本人身份证的真实姓名">
                                </td>
                            </tr>
                            <tr>
                                <td class="shrink">身份证号</td>
                                <td class="expand"><input id="idcard" class="layui-input" name="idcard" type="text"
                                                          placeholder="二代身份证，请输入数字或字母x"></td>
                            </tr>
                            <tr>
                                <td class="shrink">手机号</td>
                                <td class="expand"><input id="mob" name="phone" class="layui-input"
                                                          oninput="value=value.replace(/[^\d]/g,'')" type="text"
                                                          placeholder="请输入手机号码"></td>
                            </tr>

                            <tr>
                                <td class="shrink">客服联系人</td>
                                <td class="expand"><input name="serviceName" class="layui-input" type="text"
                                                          placeholder="客服联系人"></td>
                            </tr>
                            <tr>
                                <td class="shrink">客服咨询电话</td>
                                <td class="expand"><input id="pho" name="servicePhone" class="layui-input" type="text"
                                                          placeholder="客服咨询电话"></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <select name="" class="layui-select">
                                        <option>请选择</option>
                                        <option>河南省</option>
                                    </select>

                                    <select class="layui-select">
                                        <option>请选择</option>
                                        <option>郑州市</option>
                                        <option>开封市</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="shrink">项目类型</td>


                                <td class="expand">
                                    <select id="typeSel" name="typeId" class="layui-select">
                                    </select>
                                </td>

                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td class="fubiaoti">
                        项目信息
                    </td>
                    <td colspan="2">
                        <table class="layui-table">
                            <tr>
                                <td class="shrink">设置封面：</td>
                                <td class="expand"><input required name="file" type="file"></td>
                            </tr>
                            <tr>
                                <td class="shrink">项目标题：</td>
                                <td class="expand"><input required class="layui-input" type="text" name="title"
                                                          placeholder="项目标题"></td>
                            </tr>
                            <tr>
                                <td class="shrink">筹款目的：</td>
                                <td class="expand"><textarea class="layui-textarea" name="goal"
                                                             placeholder="阐述筹款目的"></textarea></td>
                            </tr>
                            <tr>
                                <td class="shrink">筹资金额：</td>
                                <td class="expand"><input type="text" oninput="value=value.replace(/[^\d]/g,'')"
                                                          name="money" class="layui-input"
                                                          placeholder="输入你需要的金额，最少500元"></td>
                            </tr>
                            <tr>
                                <td class="shrink">筹资天数：</td>
                                <td class="expand"><input oninput="value=value.replace(/[^\d]/g,'')" name="days"
                                                          class="layui-input" type="text" placeholder=""></td>
                            </tr>
                            <tr>
                                <td class="shrink">项目故事：</td>
                                <td class="expand"><textarea class="layui-textarea" name="story"
                                                             placeholder="讲述背后的故事"></textarea></td>
                            </tr>
                            <tr>
                                <td class="shrink">更多支持：</td>
                                <td class="expand"><textarea class="layui-textarea" placeholder="获取更多支持"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td class="shrink">提供回报：</td>
                                <td class="expand"><textarea class="layui-textarea" name="providereturns"
                                                             placeholder="简述回报内容"></textarea></td>
                            </tr>
                            <tr>
                                <td class="shrink">关于我：</td>
                                <td class="expand"><textarea class="layui-textarea" name="aboutme"
                                                             placeholder="关于自己有什么和大家分享的"></textarea></td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td class="fubiaoti">回报设置</td>
                    <td colspan="2">

                        <table class="layui-table">
                            <tr>
                                <td class="shrink">回报类型：</td>
                                <td class="expand">

                                    <input type="radio" name="type" id="optionsRadios3" value="option1" checked>
                                    实物回报(回报需邮寄)


                                    <input type="radio" name="type" id="optionsRadios4" value="option2">
                                    虚拟回报(回报无需邮寄)

                                </td>
                            </tr>
                            <tr>
                                <td class="shrink">支持金额：</td>
                                <td class="expand"><input id="paymoney" name="paymoney" class="layui-input"
                                                          placeholder="单位：元"></td>
                            </tr>
                            <tr>
                                <td class="shrink">具体规则：</td>
                                <td class="expand"><input name="rule" id="rule" type="text" class="layui-input"
                                                          placeholder="此项必填"></td>
                            </tr>
                            <tr>
                                <td class="shrink">回报内容：</td>
                                <td class="expand"><textarea id="con" name="content" class="layui-textarea"
                                                             placeholder=""></textarea></td>
                            </tr>
                            <tr>
                                <td class="shrink">人数上限：</td>
                                <td class="expand"><input name="number" id="number" class="layui-input"
                                                          placeholder="0即不需要设置名额"></td>
                            </tr>
                            <tr>
                                <td class="shrink">回报时间：</td>
                                <td class="expand"><input class="layui-input" name="time" id="time"
                                                          placeholder="0即开奖后立即发送"></td>
                            </tr>
                        </table>


                    </td>
                </tr>
            </form>
        </table>

    </div>

</div>
<script type="text/javascript">
    var isCkecked = false;
    $(document).ready(function () {
        $.ajax({
            url: "/type/getAll",
            type: "post",
            dataType: "json",
            data: {},
            success: function (result) {
                console.log(result)
                $("#typeSel option").remove();
                for(var i = 0;i<result.length;i++){
                    $("#typeSel").append("<option value='"+result[i].id+"'>"+result[i].name+"</option>")
                }
                $("#pic").attr("href","${dfsf}")
            },
            error:function (result) {
                $("#typeSel option").remove();
            }
        })
    })
    function check() {
        $()
    }

</script>


<!--底部开始-->
<div id="bottom">
    <div class="bottom-ggt"><a href=""><img src="images/bottbom_68.jpg" alt=""/></a></div>
    <div class="zc-yqlink">
        <ul>
            <li><a href="">阿里巴巴集团</a></li>
            <li><a href="">淘宝网</a></li>
            <li><a href="">天猫</a></li>
            <li><a href="">聚划算</a></li>
            <li><a href="">全球速卖通</a></li>
            <li><a href="">阿里巴巴国际交易市场</a></li>
            <li><a href="">1688</a></li>
            <li><a href="">阿里妈妈</a></li>
            <li><a href="">阿里旅行</a></li>
            <li><a href="">阿里云计算</a></li>
            <li><a href="">阿里巴巴集团</a></li>
            <li><a href="">淘宝网</a></li>
            <li><a href="">天猫</a></li>
            <li><a href="">聚划算</a></li>
            <li><a href="">全球速卖通</a></li>
            <li><a href="">阿里巴巴国际交易市场</a></li>
            <li><a href="">1688</a></li>
            <li><a href="">阿里妈妈</a></li>
            <li><a href="">阿里云计算</a></li>
        </ul>
    </div>
    <div class="footer-bd">

        <a href=" ">关于淘宝</a>
        <a href=" ">合作伙伴</a>
        <a href=" ">营销中心</a>
        <a href=" ">廉正举报</a>
        <a href=" ">联系客服</a>
        <a href=" ">开放平台</a>
        <a href=" ">诚征英才</a>
        <a href=" ">联系我们</a>
        <a href=" ">网站地图</a>
        <a href=" ">法律声明</a>　　　
        <em>© 2003-2015 Taobao.com 版权所有</em><br>

        <br>
        <span>网络文化经营许可证：<a href=" ">浙网文[2013]0268-027号</a></span>
        <b>|</b>
        <span data-spm-protocol="i">增值电信业务经营许可证：<a href="">浙B2-20080224-1</a></span>
        <b>|</b>
        <span>信息网络传播视听节目许可证：1109364号</span>
        <b>|</b>
        <span>举报电话:0571-81683755</span>
    </div>
</div>
</body>
</html>